﻿<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:Coding4Fun.Phone.Controls">

	<Style TargetType="local:ToastPrompt">
		<Setter Property="FontFamily" Value="{StaticResource PhoneFontFamilyNormal}"/>
		<Setter Property="FontSize" Value="{StaticResource PhoneFontSizeSmall}"/>
		<Setter Property="Foreground" Value="White"/>
		<Setter Property="Background" Value="{StaticResource PhoneAccentBrush}"/>
		<Setter Property="VerticalAlignment" Value="Top" />
		<Setter Property="Overlay" Value="{StaticResource TransparentBrush}" />
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="local:ToastPrompt">
					<Grid
						VerticalAlignment="{TemplateBinding VerticalAlignment}"
                        Background="{TemplateBinding Background}">
						<StackPanel 
                            VerticalAlignment="Bottom" 
							Margin="24, 32, 16, 5" 
							Orientation="{TemplateBinding TextOrientation}">
							<StackPanel
                                Margin="0,0,16,0"
                                VerticalAlignment="Bottom"
                                Orientation="Horizontal">
								<Image 
                                    Stretch="None"
                                    Margin="0,0,16,0"
								    Visibility="Collapsed"
								    Name="ToastImage"
                                    VerticalAlignment="Bottom"
								    Source="{TemplateBinding ImageSource}" />
								<TextBlock 
                                    Text="{TemplateBinding Title}"
								    FontWeight="Bold"
                                    VerticalAlignment="Center"
								    Margin="0"
                                    Padding="0" />
							</StackPanel>
							<TextBlock 
                                Text="{TemplateBinding Message}" 
								Margin="0"
                                Padding="0" 
                                TextWrapping="{TemplateBinding TextWrapping}"
                                VerticalAlignment="Center"/>
						</StackPanel>
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
</ResourceDictionary>